#ifndef QTTILEOFFSETTOEFFECT_H
#define QTTILEOFFSETTOEFFECT_H

#include "QtSingleAnimationEffect.h"
#include <QPointF>

class QtPixmapSprite;
class QtTileOffsetToEffect: public QtSingleAnimationEffect
{
public:
	QtTileOffsetToEffect();
	QtTileOffsetToEffect(const QtTileOffsetToEffect& rhs);
	virtual ~QtTileOffsetToEffect();

	void SetTarget(QtPixmapSprite *sprite);
	QtPixmapSprite* Target() const;

	void SetRelativeEndPosition(const QPoint& position);
	void SetAbsoluteEndPosition(const QPoint& position);
	QtAnimationEffect* Clone() const;

protected:
	void SetupAnimation();

private slots:
	void Update(qreal value);

private:
	QPoint endPosition;
	QPoint startPosition;
	QtPixmapSprite *target;
	bool relative;
};

#endif //QTTILEOFFSETTOEFFECT_H
